package com.wifeacountbook;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;

public class RecordTabActivity extends TabActivity{
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		TabHost thost = getTabHost();
		setUpConsumeTab(thost);
		setUpIncomeTab(thost);
	}

	private void setUpIncomeTab(TabHost thost) {
		Intent intent = new Intent();
		intent.setClass(this, IncomeDetailListActivity.class);
		intent.setAction(AcountRecorder.ACTION_INCOME_RECORD_ADD);
		thost.addTab(thost.newTabSpec("income record").setIndicator(getString(R.string.str_incomerecoder)).setContent(intent));
	}

	private void setUpConsumeTab(TabHost thost) {
		Intent intent = new Intent();
		intent.setAction(AcountRecorder.ACTION_CONSUME_RECORD_ADD);
		intent.setClass(this, DetailListActivity.class);
		thost.addTab(thost.newTabSpec("consume record").setIndicator(getString(R.string.str_acountRecorder)).setContent(intent));
		
	}
}
